3.6 \(\int \frac {1}{(a+b \csc ^2(c+d x))^2} \, dx\)

Optimal. Leaf size=92 \[ \frac {\sqrt {b} (3 a+2 b) \tan ^{-1}\left (\frac {\sqrt {b} \cot (c+d x)}{\sqrt {a+b}}\right )}{2 a^2 d (a+b)^{3/2}}+\frac {x}{a^2}+\frac {b \cot (c+d x)}{2 a d (a+b) \left (a+b \cot ^2(c+d x)+b\right )} \]

[Out]

x/a^2+1/2*b*cot(d*x+c)/a/(a+b)/d/(a+b+b*cot(d*x+c)^2)+1/2*(3*a+2*b)*arctan(cot(d*x+c)*b^(1/2)/(a+b)^(1/2))*b^(
1/2)/a^2/(a+b)^(3/2)/d

________________________________________________________________________________________

Rubi [A]  time = 0.11, antiderivative size = 92, normalized size of antiderivative = 1.00, number of steps used = 5, number of rules used = 5, integrand size = 14, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.357, Rules used = {4128, 414, 522, 203, 205} \[ \frac {\sqrt {b} (3 a+2 b) \tan ^{-1}\left (\frac {\sqrt {b} \cot (c+d x)}{\sqrt {a+b}}\right )}{2 a^2 d (a+b)^{3/2}}+\frac {x}{a^2}+\frac {b \cot (c+d x)}{2 a d (a+b) \left (a+b \cot ^2(c+d x)+b\right )} \]

Antiderivative was successfully verified.

[In]

Int[(a + b*Csc[c + d*x]^2)^(-2),x]

[Out]

x/a^2 + (Sqrt[b]*(3*a + 2*b)*ArcTan[(Sqrt[b]*Cot[c + d*x])/Sqrt[a + b]])/(2*a^2*(a + b)^(3/2)*d) + (b*Cot[c +
d*x])/(2*a*(a + b)*d*(a + b + b*Cot[c + d*x]^2))

Rule 203

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1*ArcTan[(Rt[b, 2]*x)/Rt[a, 2]])/(Rt[a, 2]*Rt[b, 2]), x] /;
 FreeQ[{a, b}, x] && PosQ[a/b] && (GtQ[a, 0] || GtQ[b, 0])

Rule 205

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(Rt[a/b, 2]*ArcTan[x/Rt[a/b, 2]])/a, x] /; FreeQ[{a, b}, x]
&& PosQ[a/b]

Rule 414

Int[((a_) + (b_.)*(x_)^(n_))^(p_)*((c_) + (d_.)*(x_)^(n_))^(q_), x_Symbol] :> -Simp[(b*x*(a + b*x^n)^(p + 1)*(
c + d*x^n)^(q + 1))/(a*n*(p + 1)*(b*c - a*d)), x] + Dist[1/(a*n*(p + 1)*(b*c - a*d)), Int[(a + b*x^n)^(p + 1)*
(c + d*x^n)^q*Simp[b*c + n*(p + 1)*(b*c - a*d) + d*b*(n*(p + q + 2) + 1)*x^n, x], x], x] /; FreeQ[{a, b, c, d,
 n, q}, x] && NeQ[b*c - a*d, 0] && LtQ[p, -1] &&  !( !IntegerQ[p] && IntegerQ[q] && LtQ[q, -1]) && IntBinomial
Q[a, b, c, d, n, p, q, x]

Rule 522

Int[((e_) + (f_.)*(x_)^(n_))/(((a_) + (b_.)*(x_)^(n_))*((c_) + (d_.)*(x_)^(n_))), x_Symbol] :> Dist[(b*e - a*f
)/(b*c - a*d), Int[1/(a + b*x^n), x], x] - Dist[(d*e - c*f)/(b*c - a*d), Int[1/(c + d*x^n), x], x] /; FreeQ[{a
, b, c, d, e, f, n}, x]

Rule 4128

Int[((a_) + (b_.)*sec[(e_.) + (f_.)*(x_)]^2)^(p_), x_Symbol] :> With[{ff = FreeFactors[Tan[e + f*x], x]}, Dist
[ff/f, Subst[Int[(a + b + b*ff^2*x^2)^p/(1 + ff^2*x^2), x], x, Tan[e + f*x]/ff], x]] /; FreeQ[{a, b, e, f, p},
 x] && NeQ[a + b, 0] && NeQ[p, -1]

Rubi steps

\begin {align*} \int \frac {1}{\left (a+b \csc ^2(c+d x)\right )^2} \, dx &=-\frac {\operatorname {Subst}\left (\int \frac {1}{\left (1+x^2\right ) \left (a+b+b x^2\right )^2} \, dx,x,\cot (c+d x)\right )}{d}\\ &=\frac {b \cot (c+d x)}{2 a (a+b) d \left (a+b+b \cot ^2(c+d x)\right )}-\frac {\operatorname {Subst}\left (\int \frac {2 a+b-b x^2}{\left (1+x^2\right ) \left (a+b+b x^2\right )} \, dx,x,\cot (c+d x)\right )}{2 a (a+b) d}\\ &=\frac {b \cot (c+d x)}{2 a (a+b) d \left (a+b+b \cot ^2(c+d x)\right )}-\frac {\operatorname {Subst}\left (\int \frac {1}{1+x^2} \, dx,x,\cot (c+d x)\right )}{a^2 d}+\frac {(b (3 a+2 b)) \operatorname {Subst}\left (\int \frac {1}{a+b+b x^2} \, dx,x,\cot (c+d x)\right )}{2 a^2 (a+b) d}\\ &=\frac {x}{a^2}+\frac {\sqrt {b} (3 a+2 b) \tan ^{-1}\left (\frac {\sqrt {b} \cot (c+d x)}{\sqrt {a+b}}\right )}{2 a^2 (a+b)^{3/2} d}+\frac {b \cot (c+d x)}{2 a (a+b) d \left (a+b+b \cot ^2(c+d x)\right )}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.83, size = 166, normalized size = 1.80 \[ -\frac {\csc ^4(c+d x) (a \cos (2 (c+d x))-a-2 b) \left (\sqrt {a+b} \left (2 \left (a^2+3 a b+2 b^2\right ) (c+d x)+a b \sin (2 (c+d x))-2 a (a+b) (c+d x) \cos (2 (c+d x))\right )-\sqrt {b} (3 a+2 b) (a (-\cos (2 (c+d x)))+a+2 b) \tan ^{-1}\left (\frac {\sqrt {a+b} \tan (c+d x)}{\sqrt {b}}\right )\right )}{8 a^2 d (a+b)^{3/2} \left (a+b \csc ^2(c+d x)\right )^2} \]

Antiderivative was successfully verified.

[In]

Integrate[(a + b*Csc[c + d*x]^2)^(-2),x]

[Out]

-1/8*((-a - 2*b + a*Cos[2*(c + d*x)])*Csc[c + d*x]^4*(-(Sqrt[b]*(3*a + 2*b)*ArcTan[(Sqrt[a + b]*Tan[c + d*x])/
Sqrt[b]]*(a + 2*b - a*Cos[2*(c + d*x)])) + Sqrt[a + b]*(2*(a^2 + 3*a*b + 2*b^2)*(c + d*x) - 2*a*(a + b)*(c + d
*x)*Cos[2*(c + d*x)] + a*b*Sin[2*(c + d*x)])))/(a^2*(a + b)^(3/2)*d*(a + b*Csc[c + d*x]^2)^2)

________________________________________________________________________________________

fricas [B]  time = 0.49, size = 492, normalized size = 5.35 \[ \left [\frac {8 \, {\left (a^{2} + a b\right )} d x \cos \left (d x + c\right )^{2} - 4 \, a b \cos \left (d x + c\right ) \sin \left (d x + c\right ) - 8 \, {\left (a^{2} + 2 \, a b + b^{2}\right )} d x + {\left ({\left (3 \, a^{2} + 2 \, a b\right )} \cos \left (d x + c\right )^{2} - 3 \, a^{2} - 5 \, a b - 2 \, b^{2}\right )} \sqrt {-\frac {b}{a + b}} \log \left (\frac {{\left (a^{2} + 8 \, a b + 8 \, b^{2}\right )} \cos \left (d x + c\right )^{4} - 2 \, {\left (a^{2} + 5 \, a b + 4 \, b^{2}\right )} \cos \left (d x + c\right )^{2} + 4 \, {\left ({\left (a^{2} + 3 \, a b + 2 \, b^{2}\right )} \cos \left (d x + c\right )^{3} - {\left (a^{2} + 2 \, a b + b^{2}\right )} \cos \left (d x + c\right )\right )} \sqrt {-\frac {b}{a + b}} \sin \left (d x + c\right ) + a^{2} + 2 \, a b + b^{2}}{a^{2} \cos \left (d x + c\right )^{4} - 2 \, {\left (a^{2} + a b\right )} \cos \left (d x + c\right )^{2} + a^{2} + 2 \, a b + b^{2}}\right )}{8 \, {\left ({\left (a^{4} + a^{3} b\right )} d \cos \left (d x + c\right )^{2} - {\left (a^{4} + 2 \, a^{3} b + a^{2} b^{2}\right )} d\right )}}, \frac {4 \, {\left (a^{2} + a b\right )} d x \cos \left (d x + c\right )^{2} - 2 \, a b \cos \left (d x + c\right ) \sin \left (d x + c\right ) - 4 \, {\left (a^{2} + 2 \, a b + b^{2}\right )} d x + {\left ({\left (3 \, a^{2} + 2 \, a b\right )} \cos \left (d x + c\right )^{2} - 3 \, a^{2} - 5 \, a b - 2 \, b^{2}\right )} \sqrt {\frac {b}{a + b}} \arctan \left (\frac {{\left ({\left (a + 2 \, b\right )} \cos \left (d x + c\right )^{2} - a - b\right )} \sqrt {\frac {b}{a + b}}}{2 \, b \cos \left (d x + c\right ) \sin \left (d x + c\right )}\right )}{4 \, {\left ({\left (a^{4} + a^{3} b\right )} d \cos \left (d x + c\right )^{2} - {\left (a^{4} + 2 \, a^{3} b + a^{2} b^{2}\right )} d\right )}}\right ] \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(a+b*csc(d*x+c)^2)^2,x, algorithm="fricas")

[Out]

[1/8*(8*(a^2 + a*b)*d*x*cos(d*x + c)^2 - 4*a*b*cos(d*x + c)*sin(d*x + c) - 8*(a^2 + 2*a*b + b^2)*d*x + ((3*a^2
 + 2*a*b)*cos(d*x + c)^2 - 3*a^2 - 5*a*b - 2*b^2)*sqrt(-b/(a + b))*log(((a^2 + 8*a*b + 8*b^2)*cos(d*x + c)^4 -
 2*(a^2 + 5*a*b + 4*b^2)*cos(d*x + c)^2 + 4*((a^2 + 3*a*b + 2*b^2)*cos(d*x + c)^3 - (a^2 + 2*a*b + b^2)*cos(d*
x + c))*sqrt(-b/(a + b))*sin(d*x + c) + a^2 + 2*a*b + b^2)/(a^2*cos(d*x + c)^4 - 2*(a^2 + a*b)*cos(d*x + c)^2
+ a^2 + 2*a*b + b^2)))/((a^4 + a^3*b)*d*cos(d*x + c)^2 - (a^4 + 2*a^3*b + a^2*b^2)*d), 1/4*(4*(a^2 + a*b)*d*x*
cos(d*x + c)^2 - 2*a*b*cos(d*x + c)*sin(d*x + c) - 4*(a^2 + 2*a*b + b^2)*d*x + ((3*a^2 + 2*a*b)*cos(d*x + c)^2
 - 3*a^2 - 5*a*b - 2*b^2)*sqrt(b/(a + b))*arctan(1/2*((a + 2*b)*cos(d*x + c)^2 - a - b)*sqrt(b/(a + b))/(b*cos
(d*x + c)*sin(d*x + c))))/((a^4 + a^3*b)*d*cos(d*x + c)^2 - (a^4 + 2*a^3*b + a^2*b^2)*d)]

________________________________________________________________________________________

giac [A]  time = 0.34, size = 140, normalized size = 1.52 \[ -\frac {\frac {{\left (\pi \left \lfloor \frac {d x + c}{\pi } + \frac {1}{2} \right \rfloor \mathrm {sgn}\left (2 \, a + 2 \, b\right ) + \arctan \left (\frac {a \tan \left (d x + c\right ) + b \tan \left (d x + c\right )}{\sqrt {a b + b^{2}}}\right )\right )} {\left (3 \, a b + 2 \, b^{2}\right )}}{{\left (a^{3} + a^{2} b\right )} \sqrt {a b + b^{2}}} - \frac {b \tan \left (d x + c\right )}{{\left (a \tan \left (d x + c\right )^{2} + b \tan \left (d x + c\right )^{2} + b\right )} {\left (a^{2} + a b\right )}} - \frac {2 \, {\left (d x + c\right )}}{a^{2}}}{2 \, d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(a+b*csc(d*x+c)^2)^2,x, algorithm="giac")

[Out]

-1/2*((pi*floor((d*x + c)/pi + 1/2)*sgn(2*a + 2*b) + arctan((a*tan(d*x + c) + b*tan(d*x + c))/sqrt(a*b + b^2))
)*(3*a*b + 2*b^2)/((a^3 + a^2*b)*sqrt(a*b + b^2)) - b*tan(d*x + c)/((a*tan(d*x + c)^2 + b*tan(d*x + c)^2 + b)*
(a^2 + a*b)) - 2*(d*x + c)/a^2)/d

________________________________________________________________________________________

maple [A]  time = 0.71, size = 140, normalized size = 1.52 \[ \frac {b \tan \left (d x +c \right )}{2 d a \left (a +b \right ) \left (a \left (\tan ^{2}\left (d x +c \right )\right )+b \left (\tan ^{2}\left (d x +c \right )\right )+b \right )}-\frac {3 b \arctan \left (\frac {\left (a +b \right ) \tan \left (d x +c \right )}{\sqrt {\left (a +b \right ) b}}\right )}{2 d a \left (a +b \right ) \sqrt {\left (a +b \right ) b}}-\frac {b^{2} \arctan \left (\frac {\left (a +b \right ) \tan \left (d x +c \right )}{\sqrt {\left (a +b \right ) b}}\right )}{d \,a^{2} \left (a +b \right ) \sqrt {\left (a +b \right ) b}}+\frac {\arctan \left (\tan \left (d x +c \right )\right )}{d \,a^{2}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(1/(a+b*csc(d*x+c)^2)^2,x)

[Out]

1/2/d*b/a/(a+b)*tan(d*x+c)/(a*tan(d*x+c)^2+b*tan(d*x+c)^2+b)-3/2/d*b/a/(a+b)/((a+b)*b)^(1/2)*arctan((a+b)*tan(
d*x+c)/((a+b)*b)^(1/2))-1/d*b^2/a^2/(a+b)/((a+b)*b)^(1/2)*arctan((a+b)*tan(d*x+c)/((a+b)*b)^(1/2))+1/d/a^2*arc
tan(tan(d*x+c))

________________________________________________________________________________________

maxima [A]  time = 0.43, size = 109, normalized size = 1.18 \[ \frac {\frac {b \tan \left (d x + c\right )}{a^{2} b + a b^{2} + {\left (a^{3} + 2 \, a^{2} b + a b^{2}\right )} \tan \left (d x + c\right )^{2}} - \frac {{\left (3 \, a b + 2 \, b^{2}\right )} \arctan \left (\frac {{\left (a + b\right )} \tan \left (d x + c\right )}{\sqrt {{\left (a + b\right )} b}}\right )}{{\left (a^{3} + a^{2} b\right )} \sqrt {{\left (a + b\right )} b}} + \frac {2 \, {\left (d x + c\right )}}{a^{2}}}{2 \, d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(a+b*csc(d*x+c)^2)^2,x, algorithm="maxima")

[Out]

1/2*(b*tan(d*x + c)/(a^2*b + a*b^2 + (a^3 + 2*a^2*b + a*b^2)*tan(d*x + c)^2) - (3*a*b + 2*b^2)*arctan((a + b)*
tan(d*x + c)/sqrt((a + b)*b))/((a^3 + a^2*b)*sqrt((a + b)*b)) + 2*(d*x + c)/a^2)/d

________________________________________________________________________________________

mupad [B]  time = 1.99, size = 1958, normalized size = 21.28 \[ \text {result too large to display} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(1/(a + b/sin(c + d*x)^2)^2,x)

[Out]

(b*tan(c + d*x))/(2*a*d*(b + tan(c + d*x)^2*(a + b))*(a + b)) - (atan((((-b*(a + b)^3)^(1/2)*((tan(c + d*x)*(2
8*a*b^3 + 16*a^3*b + 4*a^4 + 8*b^4 + 33*a^2*b^2))/(2*(a^2*b + a^3)) - (((2*a^6*b + 2*a^4*b^3 + 4*a^5*b^2)/(a^3
*b + a^4) - (tan(c + d*x)*(-b*(a + b)^3)^(1/2)*(3*a + 2*b)*(80*a^7*b + 16*a^8 + 32*a^4*b^4 + 112*a^5*b^3 + 144
*a^6*b^2))/(8*(a^2*b + a^3)*(3*a^4*b + a^5 + a^2*b^3 + 3*a^3*b^2)))*(-b*(a + b)^3)^(1/2)*(3*a + 2*b))/(4*(3*a^
4*b + a^5 + a^2*b^3 + 3*a^3*b^2)))*(3*a + 2*b)*1i)/(4*(3*a^4*b + a^5 + a^2*b^3 + 3*a^3*b^2)) + ((-b*(a + b)^3)
^(1/2)*((tan(c + d*x)*(28*a*b^3 + 16*a^3*b + 4*a^4 + 8*b^4 + 33*a^2*b^2))/(2*(a^2*b + a^3)) + (((2*a^6*b + 2*a
^4*b^3 + 4*a^5*b^2)/(a^3*b + a^4) + (tan(c + d*x)*(-b*(a + b)^3)^(1/2)*(3*a + 2*b)*(80*a^7*b + 16*a^8 + 32*a^4
*b^4 + 112*a^5*b^3 + 144*a^6*b^2))/(8*(a^2*b + a^3)*(3*a^4*b + a^5 + a^2*b^3 + 3*a^3*b^2)))*(-b*(a + b)^3)^(1/
2)*(3*a + 2*b))/(4*(3*a^4*b + a^5 + a^2*b^3 + 3*a^3*b^2)))*(3*a + 2*b)*1i)/(4*(3*a^4*b + a^5 + a^2*b^3 + 3*a^3
*b^2)))/(((7*a*b^2)/2 + 3*a^2*b + b^3)/(a^3*b + a^4) - ((-b*(a + b)^3)^(1/2)*((tan(c + d*x)*(28*a*b^3 + 16*a^3
*b + 4*a^4 + 8*b^4 + 33*a^2*b^2))/(2*(a^2*b + a^3)) - (((2*a^6*b + 2*a^4*b^3 + 4*a^5*b^2)/(a^3*b + a^4) - (tan
(c + d*x)*(-b*(a + b)^3)^(1/2)*(3*a + 2*b)*(80*a^7*b + 16*a^8 + 32*a^4*b^4 + 112*a^5*b^3 + 144*a^6*b^2))/(8*(a
^2*b + a^3)*(3*a^4*b + a^5 + a^2*b^3 + 3*a^3*b^2)))*(-b*(a + b)^3)^(1/2)*(3*a + 2*b))/(4*(3*a^4*b + a^5 + a^2*
b^3 + 3*a^3*b^2)))*(3*a + 2*b))/(4*(3*a^4*b + a^5 + a^2*b^3 + 3*a^3*b^2)) + ((-b*(a + b)^3)^(1/2)*((tan(c + d*
x)*(28*a*b^3 + 16*a^3*b + 4*a^4 + 8*b^4 + 33*a^2*b^2))/(2*(a^2*b + a^3)) + (((2*a^6*b + 2*a^4*b^3 + 4*a^5*b^2)
/(a^3*b + a^4) + (tan(c + d*x)*(-b*(a + b)^3)^(1/2)*(3*a + 2*b)*(80*a^7*b + 16*a^8 + 32*a^4*b^4 + 112*a^5*b^3
+ 144*a^6*b^2))/(8*(a^2*b + a^3)*(3*a^4*b + a^5 + a^2*b^3 + 3*a^3*b^2)))*(-b*(a + b)^3)^(1/2)*(3*a + 2*b))/(4*
(3*a^4*b + a^5 + a^2*b^3 + 3*a^3*b^2)))*(3*a + 2*b))/(4*(3*a^4*b + a^5 + a^2*b^3 + 3*a^3*b^2))))*(-b*(a + b)^3
)^(1/2)*(3*a + 2*b)*1i)/(2*d*(3*a^4*b + a^5 + a^2*b^3 + 3*a^3*b^2)) - atan((((((2*a^6*b + 2*a^4*b^3 + 4*a^5*b^
2)*1i)/(2*(a^3*b + a^4)) - (tan(c + d*x)*(80*a^7*b + 16*a^8 + 32*a^4*b^4 + 112*a^5*b^3 + 144*a^6*b^2))/(8*a^2*
(a^2*b + a^3)))/(2*a^2) + (tan(c + d*x)*(28*a*b^3 + 16*a^3*b + 4*a^4 + 8*b^4 + 33*a^2*b^2))/(4*(a^2*b + a^3)))
/a^2 - ((((2*a^6*b + 2*a^4*b^3 + 4*a^5*b^2)*1i)/(2*(a^3*b + a^4)) + (tan(c + d*x)*(80*a^7*b + 16*a^8 + 32*a^4*
b^4 + 112*a^5*b^3 + 144*a^6*b^2))/(8*a^2*(a^2*b + a^3)))/(2*a^2) - (tan(c + d*x)*(28*a*b^3 + 16*a^3*b + 4*a^4
+ 8*b^4 + 33*a^2*b^2))/(4*(a^2*b + a^3)))/a^2)/(((7*a*b^2)/2 + 3*a^2*b + b^3)/(a^3*b + a^4) + (((((2*a^6*b + 2
*a^4*b^3 + 4*a^5*b^2)*1i)/(2*(a^3*b + a^4)) - (tan(c + d*x)*(80*a^7*b + 16*a^8 + 32*a^4*b^4 + 112*a^5*b^3 + 14
4*a^6*b^2))/(8*a^2*(a^2*b + a^3)))*1i)/(2*a^2) + (tan(c + d*x)*(28*a*b^3 + 16*a^3*b + 4*a^4 + 8*b^4 + 33*a^2*b
^2)*1i)/(4*(a^2*b + a^3)))/a^2 + (((((2*a^6*b + 2*a^4*b^3 + 4*a^5*b^2)*1i)/(2*(a^3*b + a^4)) + (tan(c + d*x)*(
80*a^7*b + 16*a^8 + 32*a^4*b^4 + 112*a^5*b^3 + 144*a^6*b^2))/(8*a^2*(a^2*b + a^3)))*1i)/(2*a^2) - (tan(c + d*x
)*(28*a*b^3 + 16*a^3*b + 4*a^4 + 8*b^4 + 33*a^2*b^2)*1i)/(4*(a^2*b + a^3)))/a^2))/(a^2*d)

________________________________________________________________________________________

sympy [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {1}{\left (a + b \csc ^{2}{\left (c + d x \right )}\right )^{2}}\, dx \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(a+b*csc(d*x+c)**2)**2,x)

[Out]

Integral((a + b*csc(c + d*x)**2)**(-2), x)

________________________________________________________________________________________